<template>
	<view class="">
		<!-- 图文信息 -->
		<block v-for="(item,index) in content">
			<view class="blogger__item" :key="index">
				<view class="blogger__author tn-flex tn-flex-row-between tn-flex-col-center">
					<view class="justify__author__info" @click="tn('/circlePages/blogger_other')">
						<view class="tn-flex tn-flex-row-center">
							<view class="tn-flex tn-flex-row-center tn-flex-col-center">
								<view class="">
									<tn-avatar class="" shape="circle" :src="item.userAvatar" size="sm">
									</tn-avatar>
								</view>
								<view class="tn-padding-right tn-text-ellipsis tn-flex tn-flex-col-center">
									<view class="tn-padding-right tn-padding-left-sm tn-text-lg">
										{{ item.userName }}
									</view>
									<image src="@/static/index/julebuhuodong.png" class="active-label"></image>
								</view>
							</view>
						</view>
					</view>
					<view class="blogger__author__btn justify-content-item tn-flex-col-center tn-flex-row-center">
						<text class="tag-item" v-if="item.type && tabCurrent === 0">{{item.type}}</text>
						<view class="vs-bj tn-flex tn-flex-col-center tn-flex-row-center" v-if="tabCurrent === 1">
							<span class="red">{{item.isReserve}}</span>
							<span class="blue">{{item.num}}</span>
						</view>
					</view>
				</view>
				<view class="tn-flex tn-flex-col-center tn-flex-col-center">
					<image :src="item.userAvatar" class="main-img"></image>
					<view class="right-info tn-flex tn-flex-direction-column">
						<text class="tn-text-bold tn-text-ellipsis tn-text-xl">{{item.desc}}</text>
						<view class="tn-flex tn-flex-col-center tn-margin-top-xs tn-margin-bottom-xs"
							style="color: red;">
							<text>￥</text>
							<text class="tn-text-bold " style="margin: 0 5rpx;">38</text>
							<text>起</text>
						</view>
						<view class="tn-flex tn-flex-col-center tn-margin-top-xs tn-margin-bottom-xs">
							<text class="tn-icon-time"></text>
							<text class="tn-margin-left-xs tn-color-gray--dark">{{item.date}}</text>
						</view>
						<view class="tn-flex tn-flex-col-center">
							<text class="tn-icon-location"></text>
							<text class="tn-margin-left-xs tn-color-gray--dark tn-text-ellipsis">{{item.address}}</text>
							<text class="tn-margin-left-xs tn-color-gray--dark">{{item.km||0}}km</text>
						</view>
					</view>
				</view>
				<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin-top-xs">
					<view class="justify-content-item tn-flex tn-flex-col-center">
						<view style="margin-right: 10rpx;">
							<tn-avatar-group :lists="item.viewUser.latestUserAvatar" size="sm"></tn-avatar-group>
						</view>
						<view class="tn-flex tn-text-bold tn-flex-col-center tn-text-lg">
							<text class="tn-margin-right-xs">已报名</text>
							<text>{{ item.viewUser.viewUserCount }}</text>
							<text class="tn-color-gray">/{{ item.viewUser.viewUserCount }}</text>
						</view>
					</view>
				</view>
				<!-- 去报名 -->
				<view class="sign-up sign-up1" v-if="item.status === 0 && tabCurrent === 1"></view>
				<!-- 已结束 -->
				<view class="sign-up sign-up2" v-else-if="item.status === 4 && tabCurrent === 1"></view>
				<!-- 待审核 -->
				<view class="sign-up sign-up3" v-else-if="tabCurrent === 2"></view>
				<!-- 立即加入 -->
				<view class="sign-up sign-up4" v-else></view>
			</view>
			<!-- 边距间隔 -->
			<view class="tn-strip-bottom" v-if="index != content.length - 1"></view>
		</block>
	</view>
</template>

<script>
	export default {
		props: {
			tabCurrent: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				content: [{
						id: 1,
						name: '赢撒风羽毛球(天山店)',
						type: '羽毛球',
						headImg: '',
						img: '',
						title: '免费停车，周三晚场6-8畅打',
						price: 28,
						time: '周三 1/22 18:00-20:00',
						address: '赢撒风羽毛球KAWASAKI馆',
						km: '993.7',
						isReserve: 5,
						num: 10,
						userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg',
						userName: '图鸟北北',
						date: '2022年5月20日',
						label: ['开源', '创意', 'UI框架'],
						desc: '开源可商用组件，助你开发酷炫UI一臂之力',
						content: '基础常用的布局元素，酷炫完善的配色体系，统一可增的图标 icon ，简便调用的功能组件，酷炫的前端页面，吖，编不下去了',
						viewUser: {
							latestUserAvatar: [{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'
								},
							],
							viewUserCount: 62
						},
						collectionCount: 439,
						commentCount: 46,
						likeCount: 83
					},
					{
						userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg',
						userName: '图鸟北北',
						date: '2022年5月20日',
						label: ['开源', '创意', 'UI框架'],
						desc: '开源可商用组件，助你开发酷炫UI一臂之力',
						content: '基础常用的布局元素，酷炫完善的配色体系，统一可增的图标 icon ，简便调用的功能组件，酷炫的前端页面，吖，编不下去了',
						mainImage: [
							'https://resource.tuniaokj.com/images/blogger/content_1.jpeg'
						],
						viewUser: {
							latestUserAvatar: [{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'
								},
							],
							viewUserCount: 12
						},
						collectionCount: 902,
						commentCount: 64,
						likeCount: 83,
						status: 4, //已结束
					},
					{
						userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg',
						userName: '图鸟北北',
						date: '2022年5月20日',
						label: [],
						desc: '',
						content: '',
						mainImage: [
							'https://resource.tuniaokj.com/images/shop/computer2.jpg',
							'https://resource.tuniaokj.com/images/shop/prototype2.jpg',
						],
						viewUser: {
							latestUserAvatar: [{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'
								},
							],
							viewUserCount: 56
						},
						collectionCount: 431,
						commentCount: 26,
						likeCount: 84,
						status: 0, //去报名
					},
					{
						userAvatar: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg',
						userName: '图鸟北北',
						date: '2022年5月20日',
						label: ['开源', '创意'],
						desc: '开源可商用组件',
						content: '基础常用的布局元素，酷炫完善的配色体系，统一可增的图标 icon ，简便调用的功能组件，酷炫的前端页面，吖，编不下去了 基础常用的布局元素，酷炫完善的配色体系，统一可增的图标 icon ，简便调用的功能组件，酷炫的前端页面，吖，编不下去了',
						mainImage: [
							'https://resource.tuniaokj.com/images/swiper/swiper2.jpg',
							'https://resource.tuniaokj.com/images/swiper/swiper3.jpg',
							'https://resource.tuniaokj.com/images/swiper/swiper4.jpg',
						],
						viewUser: {
							latestUserAvatar: [{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_1.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_4.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_2.jpeg'
								},
								{
									src: 'https://resource.tuniaokj.com/images/blogger/avatar_3.jpeg'
								},
							],
							viewUserCount: 231
						},
						collectionCount: 780,
						commentCount: 89,
						likeCount: 82
					},
				]
			}
		}
	}
</script>

<style scoped lang="scss">
	.template-circle {
		max-height: 100vh;
	}

	.tn-tabbar-height {
		min-height: 120rpx;
		height: calc(140rpx + env(safe-area-inset-bottom) / 2);
	}

	/* 自定义导航栏内容 start */
	.custom-nav {
		height: 100%;

		&__back {
			margin: auto 5rpx;
			font-size: 40rpx;
			margin-right: 10rpx;
			margin-left: 30rpx;
			flex-basis: 5%;
		}

		&__search {
			flex-basis: 60%;
			width: 100%;
			height: 100%;

			&__box {
				width: 100%;
				height: 70%;
				padding: 10rpx 0;
				margin: 0 30rpx;
				border-radius: 60rpx 60rpx 0 60rpx;
				font-size: 24rpx;
			}

			&__icon {
				padding-right: 10rpx;
				margin-left: 20rpx;
				font-size: 30rpx;
			}

			&__text {
				color: #AAAAAA;
			}
		}
	}

	.logo-image {
		width: 60rpx;
		height: 60rpx;
		position: relative;
		margin-top: -15rpx;
	}

	.logo-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 50%;
	}

	.active-label {
		width: 160rpx;
		height: 48rpx;
	}

	/* 自定义导航栏内容 end */
	/* 博主头像 start*/
	.image-circle {
		// padding: 95rpx;
		width: 190rpx;
		height: 190rpx;
		font-size: 40rpx;
		font-weight: 300;
		position: relative;
	}

	.image-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	.main-img {
		min-width: 224rpx;
		min-height: 224rpx;
		width: 224rpx;
		height: 224rpx;
		border-radius: 20rpx;
		margin: 20rpx 20rpx 20rpx 0;
	}

	.right-info {
		width: 408rpx;
	}

	.tag-item {
		border: 1rpx solid #f55f7e;
		color: #f55f7e;
		background: #fff;
		border-radius: 10rpx;
		padding: 8rpx 16rpx;
	}

	.vs-bj {
		width: 212rpx;
		height: 56rpx;
		background-image: url('@/static/index/vs-bj.png');
		background-size: 100% 100%;
		position: relative;
		line-height: 56rpx;
		color: #fff;
		font-weight: 600;

		.red {
			position: absolute;
			left: 30rpx;

		}

		.blue {
			position: absolute;
			right: 30rpx;
		}
	}

	/* 文章内容 start*/
	.blogger {
		&__item {
			padding: 30rpx;
			background: #fff;
			position: relative;
			border-radius: 25rpx !important;
		}



		&__author {
			&__btn {
				margin-right: -12rpx;
				// opacity: 0.5;
			}
		}

		&__desc {
			line-height: 55rpx;

			&__label {
				padding: 0 20rpx;
				margin: 0rpx 18rpx 0 0;

				&--prefix {
					color: #00FFC8;
					padding-right: 10rpx;
				}
			}

			&__content {}
		}

		&__content {
			margin-top: 18rpx;
			padding-right: 18rpx;

			&__data {
				line-height: 46rpx;
				text-align: justify;
				overflow: hidden;
				transition: all 0.25s ease-in-out;

			}

			&__status {
				margin-top: 10rpx;
				font-size: 26rpx;
				color: #82B2FF;
			}
		}

		&__main-image {
			border-radius: 16rpx;

			&--1 {
				max-width: 80%;
				max-height: 300rpx;
			}

			&--2 {
				max-width: 260rpx;
				max-height: 260rpx;
			}

			&--3 {
				height: 212rpx;
				width: 100%;
			}
		}

		&__count-icon {
			font-size: 40rpx;
			padding-right: 5rpx;
		}

		&__ad {
			width: 100%;
			height: 500rpx;
			transform: translate3d(0px, 0px, 0px) !important;

			::v-deep .uni-swiper-slide-frame {
				transform: translate3d(0px, 0px, 0px) !important;
			}

			.uni-swiper-slide-frame {
				transform: translate3d(0px, 0px, 0px) !important;
			}

			&__item {
				position: absolute;
				width: 100%;
				height: 100%;
				transform-origin: left center;
				transform: translate3d(100%, 0px, 0px) scale(1) !important;
				transition: transform 0.25s ease-in-out;
				z-index: 1;

				&--0 {
					transform: translate3d(0%, 0px, 0px) scale(1) !important;
					z-index: 4;
				}

				&--1 {
					transform: translate3d(13%, 0px, 0px) scale(0.9) !important;
					z-index: 3;
				}

				&--2 {
					transform: translate3d(26%, 0px, 0px) scale(0.8) !important;
					z-index: 2;
				}
			}

			&__content {
				border-radius: 40rpx;
				width: 640rpx;
				height: 500rpx;
				overflow: hidden;
			}

			&__image {
				width: 100%;
				height: 100%;
			}
		}
	}

	/* 文章内容 end*/

	/* 间隔线 start*/
	.tn-strip-bottom {
		width: 100%;
		border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
	}

	/* 间隔线 end*/

	/* 广告内容 start */
	.ad-image {
		width: 80rpx;
		height: 80rpx;
		position: relative;
	}

	.ad-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 20%;
	}

	/* 自定义导航栏内容 end */


	/* 全屏轮播  start*/
	.card-swiper {
		height: 100vh !important;
	}

	.card-swiper swiper-item {
		width: 750rpx !important;
		left: 0rpx;
		box-sizing: border-box;
		overflow: initial;
	}

	.card-swiper swiper-item .swiper-item {
		width: 100%;
		display: block;
		height: 100vh;
		border-radius: 0rpx;
		transform: scale(1);
		transition: all 0.2s ease-in 0s;
		overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item {
		transform: none;
		transition: all 0.2s ease-in 0s;
	}

	.card-swiper swiper-item .swiper-item-png {
		margin-top: -50vh;
		width: 100%;
		display: block;
		border-radius: 0rpx;
		transform: translate(1040rpx, 20rpx) scale(0.5, 0.5);
		transition: all 0.6s ease 0s;
		// overflow: hidden;
	}

	.card-swiper swiper-item.cur .swiper-item-png {
		margin-top: -100vh;
		width: 900rpx;
		transform: translate(-80rpx, 0rpx) scale(1, 1);
		transition: all 0.6s ease 0s;
	}

	.image-banner {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.image-banner image {
		width: 100%;
	}

	/* 轮播指示点 start*/
	.indication {
		z-index: 9999;
		width: 100%;
		height: 36rpx;
		position: fixed;
		// display:flex;
		display: block;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.spot {
		background-color: #000;
		opacity: 0.3;
		width: 10rpx;
		height: 10rpx;
		border-radius: 20rpx;
		margin: 20rpx 0 !important;
		left: 95vw;
		top: -60vh;
		position: relative;
	}

	.spot.active {
		opacity: 0.6;
		height: 30rpx;
		background-color: #000;
	}

	/* 资讯主图 start*/
	.image-article {
		border-radius: 8rpx;
		border: 1rpx solid #F8F7F8;
		width: 200rpx;
		height: 200rpx;
		position: relative;
	}

	.image-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border-radius: 10rpx;
	}

	.article-shadow {
		border-radius: 15rpx;
		box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
	}

	/* 文字截取*/
	.clamp-text-1 {
		-webkit-line-clamp: 1;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-overflow: ellipsis;
		overflow: hidden;
	}

	.clamp-text-2 {
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		text-overflow: ellipsis;
		overflow: hidden;
	}


	/* 图标容器9 start */
	.icon9 {
		&__item {
			width: 30%;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 20rpx 10rpx;
			transform: scale(1);
			transition: transform 0.3s linear;
			transform-origin: center center;


			&--icon {
				width: 110rpx;
				height: 110rpx;
				font-size: 65rpx;
				border-radius: 50%;
				margin: 20rpx 40rpx;
				position: relative;
				z-index: 1;

				&::after {
					content: " ";
					position: absolute;
					z-index: -1;
					width: 100%;
					height: 100%;
					left: 0;
					bottom: 0;
					border-radius: inherit;
					opacity: 1;
					transform: scale(1, 1);
					background-size: 100% 100%;
					background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
				}
			}
		}
	}


	/* 悬浮 */
	.tnxuanfu {
		animation: suspension 3s ease-in-out infinite;
	}

	@keyframes suspension {

		0%,
		100% {
			transform: translateY(0);
		}

		50% {
			transform: translateY(-0.8rem);
		}
	}

	/* 悬浮按钮 */
	.button-shop {
		width: 90rpx;
		height: 90rpx;
		display: flex;
		flex-direction: row;
		position: fixed;
		/* bottom:200rpx;
	  right: 20rpx; */
		left: 5rpx;
		top: 5rpx;
		z-index: 1001;
		border-radius: 100px;
		opacity: 0.9;
	}


	/* 按钮 */
	.edit {
		bottom: 300rpx;
		right: 75rpx;
		position: fixed;
		z-index: 9999;
	}


	.pa,
	.pa0 {
		position: absolute
	}

	.pa0 {
		left: 0;
		top: 0
	}


	.bg0 {
		width: 100rpx;
		height: 100rpx;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.bg1 {
		width: 100%;
		height: 100%;
	}




	.hx-box {
		top: 50%;
		left: 50%;
		width: 100rpx;
		height: 100rpx;
		transform-style: preserve-3d;
		transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
	}

	.hx-box .pr {
		width: 100rpx;
		height: 100rpx;
		transform-style: preserve-3d;
		animation: hxz 20s linear infinite;
	}

	@keyframes hxz {
		0% {
			transform: rotateX(0deg);
		}

		100% {
			transform: rotateX(-360deg);
		}
	}



	.hx-box .pr .pa0 {
		width: 100rpx;
		height: 100rpx;
		/* border: 4px solid #5ec0ff; */
		border-radius: 1000px;
	}

	.hx-box .pr .pa0 .span {
		display: block;
		width: 100%;
		height: 100%;
		background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc4.png) no-repeat center center;
		background-size: 100% 100%;
		animation: hx 4s linear infinite;
	}

	@keyframes hx {
		to {
			transform: rotate(360deg);
		}
	}

	.sign-up {
		position: absolute;
		right: 0;
		bottom: 0;
		width: 280rpx;
		height: 90rpx;
		background-size: 100% 100%;
	}

	.sign-up1 {
		background-image: url('@/static/index/qubaoming.png');
	}

	.sign-up2 {
		background-image: url('@/static/index/yijieshu.png');
	}

	.sign-up3 {
		background-image: url('@/static/index/daishenhe.png');
	}

	.sign-up4 {
		background-image: url('@/static/index/lijijiaru.png');
	}
</style>